const { ccclass, property } = cc._decorator;

@ccclass
export default class CalliOS {
@property(cc.Node)
private nativeJSBridge: cc.Node = null;

private static _instance: CalliOS = null;

public static getInstance():CalliOS {
    if (this._instance == null) {
        this._instance = new CalliOS();
    }
    return this._instance;
}

public getClientInfo() {
    return this.nativeJSBridge.getComponent("DFNativeJSBridge").df_getClientInfo();
}

public getCookieInfo() {
    return this.nativeJSBridge.getComponent("DFNativeJSBridge").df_getCookieInfo();
}

public getChannelName() {
    return this.nativeJSBridge.getComponent("DFNativeJSBridge").df_getChannelName();
}

public getVersionName() {
    return this.nativeJSBridge.getComponent("DFNativeJSBridge").df_getVersionName();
}

public finishActivity() {
    this.nativeJSBridge.getComponent("DFNativeJSBridge").df_finishActivity();
}

public setUserInfo(e) {
    cc.sys.isNative && this.nativeJSBridge.getComponent("DFNativeJSBridge").df_setUserInfo(e);
}

// 其他方法省略...

// 修复onAppResume方法名拼写错误为onAppResumed
public onAppResumed() {
    console.log("Oc调用Js onAppResume");
    this.reportData("app_pause", null);
}

// 其他方法省略...
}

window.calliOS = CalliOS.getInstance();